import { createApp } from 'vue'
import App from './App.vue'
// 导入路由
import router from './router'
// 导入store
import store from './store'

// 引入组件
import Component from '@/components'
// 重置样式文件
import '@/styles/common.less'

import { directivePlugin } from '@/directives'
// // 测试requet
// import request from '@/utils/request'

// console.log(request('/test', 'get', { name: 'cp' }))
// request('/test', 'get', { name: 'cp' }).then(res => {
//   console.log(res)
// })

// // 触发mutation函数
store.commit('user/setProfile', 'test')

// createApp生成应用实例对象 -> 调用use方法注册各种插件 -> 挂载到真实的dom
createApp(App).use(store).use(router).use(Component).use(directivePlugin).mount('#app')
